
<div class="navbar navbar-primary navbar-fixed-top" style="box-shadow: 0px 0px 5px #000000;">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-material-light-blue-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="javascript:void(0)">Flask</a>
        </div>
        <div class="navbar-collapse collapse navbar-material-light-blue-collapse">
            <ul class="nav navbar-nav">
                <li {% if url_for('main.index') is current_link %}class="active"{% endif %}>
                    <a href="{{ url_for('main.index') }}" >主页</a>
                </li>
                <li {% if url_for('main.blog') is current_link %}class="active"{% endif %}>
                    <a href="{{ url_for('main.blog') }}" >写博客</a>
                </li>
                {% if current_user.is_authenticated %}
                    <li><a href="{{ url_for('main.user',username=current_user.username) }}">个人资料</a></li>
                {% endif %}
            </ul>
            <ul class="nav navbar-nav navbar-right">
                {% if current_user.can(Permission.MODERATE_COMMENTS) %}
                    <li>
                        <a href="{{ url_for('main.moderate') }}">管理评论</a>
                    </li>
                {% endif %}
                {% if current_user.is_authenticated %}
                    <li>
                        <a href="{{ url_for('auth.logout') }}">
                            <img src="{{ current_user.gravatar(size=18) }}">
                            退出
                        </a>
                    </li>
                {% else %}
                    <li><a href="{{ url_for('auth.login') }}">登陆</a></li>
                    <li><a href="{{ url_for('auth.register') }}">注册</a></li>
                {% endif %}
            </ul>
        </div>
    </div>
</div>